{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}


<div class="container-fluid content-body">
    <div class="main">
        <!-- left side start-->
        <section class="left-section">
            <dl id="leftNav" data-type="member">
                <dt><i class="glyphicon glyphicon-user"></i> 会员管理</dt>
                {if in_case_array('admin/member',$priv) || empty($priv)}
                <dd><a class="mb active" href="{url /admin/member/index}">会员列表</a></dd>
                {/if}{if in_case_array('admin/membergroup',$priv) || empty($priv)}
                <dd><a class="mbh" href="{url /admin/memberGroup/index}">分组管理</a></dd>
                {/if}
            </dl>
        </section>
        <!-- left side end-->


        <!-- main content start-->
        <section class="right-section" id="right-section">
            {include admin.inc.bread}
            <h2 class="header">{$title}</h2>
            <!-- start of inner-frame -->
            <div class="inner-iframe">
                <!-- Nav tabs -->
                <div class="inner-container">
                    <form role="form" class="form-horizontal basicForm content-add-form" id="content-add-form"
                          autocomplete="off">
                        
                        <div id="fourLinkage" style="border-top:1px solid #eee;border-bottom:1px solid #eee;padding: 10px 0px;margin: 0px 0px 10px;">
                            {if $id}
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="asterisk">*</span>会员ID</label>
                                <div class="col-sm-4">
                                    <label class="control-label">{$id}</label>
                                </div>
                            </div>
                            {/if}
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span
                                        class="asterisk">*</span>会员账号</label>
                                <div class="col-sm-4">
                                    <input type="text" class="form-control" dtype="mobile" required placeholder="手机号码" message="手机号码格式错误" cname="会员账号" name="data[username]" value="{$item[username]}"
                                           data-name="会员账号" autocomplete="false">
                                    <p class="help-block text-error"></p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span
                                        class="asterisk">*</span>密码</label>
                                <div class="col-sm-4">
                                    <input type="password" dtype="pwd" class="form-control" {if !$id}required placeholder="数字或字母组成"{else} placeholder="不填写表示不更改"{/if} cname="密码" name="data[password]" value=""
                                           data-name="密码" id="password" autocomplete="false">
                                    <p class="help-block text-error"></p>
                                </div>
                            </div>
                            {if !$id}
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span
                                        class="asterisk">*</span>确认密码</label>
                                <div class="col-sm-4">
                                    <input type="password" dtype="repass" for-password="password" placeholder="和密码保持一致" class="form-control" required cname="确认密码" value=""
                                           data-name="确认密码" autocomplete="false">
                                    <p class="help-block text-error"></p>
                                </div>
                            </div>
                            {/if}
                            <div class="form-group">
                                <label class="col-sm-2 control-label">性别</label>
                                <div class="col-sm-4">
                                    <div class="rdio rdio-default">
                                        <input type="radio" name="data[sex]" value="0" id="radioPrimaryMale" {if $item[sex]=='0' || empty($item[sex]) }checked="checked"{/if} >
                                        <label for="radioPrimaryMale">先生</label>

                                        <input type="radio" name="data[sex]" value="1" id="radioPrimaryFemale" {if $item[sex]=='1'}checked="checked"{/if} style="margin-left: 40px;">
                                        <label for="radioPrimaryFemale">女士</label>
                                    </div>
                                </div>
                            </div>
                            <p class="help-block text-error"></p>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">电子邮箱</label>
                                <div class="col-sm-4">
                                    <input type="text" class="form-control" dtype="email" maxlength="50" name="data[email]" value="{$item[email]}"
                                           data-name="电子邮箱" cname="电子邮箱">
                                    <p class="help-block text-error"></p>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">QQ</label>
                                <div class="col-sm-4">
                                    <input type="text" class="form-control" dtype="qq"  maxlength="20" name="data[qq]" value="{$item[qq]}"
                                           data-name="QQ" cname="qq">
                                </div>
                            </div>
                            <p class="help-block text-error"></p>
                            <div class="form-group">
                                 <label class="col-sm-2 control-label">所属分组</label>
                                <div class="col-sm-4">
                                    <select class="form-control select_pro " id="select_pro" name="data[group_id]"
                                            data-name="所属分组">
                                        <option value="0">无分组</option>
                                        {loop $groupItem $v}
                                        <option value="{$v[id]}" {if $v[id]=="$item[group_id]"}selected="selected"{/if}>{$v[name]}</option>
                                        {/loop}
                                    </select>
                                </div>
                            </div>
                            <!--<div class="form-group">
                                <label class="col-sm-2 control-label"><span class="asterisk">*</span>注册时间</label>
                                <div class="col-sm-4">
                                    <label class="control-label">2016-10-10 22:15::09</label>
                                </div>
                            </div>-->
                        </div>

                        <!--tmpl-fields-->
                        {if $item[dasu_pay_id]}
                        <h4 class="inline-form">实名认证</h4>
                        <div style="border-top:1px solid #eee;border-bottom:1px solid #eee;padding: 10px 0;margin: 0 0 10px;">
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="asterisk">*</span>大塑账户绑定</label>
                                <label class="col-sm-2 control-label my-left">{$item[dasu_username]}</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="asterisk">*</span>真实姓名</label>
                                <label class="col-sm-2 control-label my-left">{$item[dasu_name]}</label>
                            </div>
                            <p class="help-block"></p>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="asterisk">*</span>身份证号码</label>
                                <label class="col-sm-2 control-label my-left">{$item[idcard_no]}</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="asterisk">*</span>公司名称</label>
                                <label class="col-sm-2 control-label my-left">{$item[company]}</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="asterisk">*</span>签约银行</label>
                                <label class="col-sm-2 control-label my-left">{$item[payName]}</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="asterisk">*</span>银行卡号</label>
                                <label class="col-sm-2 control-label my-left">{$item[card_no]}</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="asterisk">*</span>附属账号</label>
                                <label class="col-sm-2 control-label my-left">{$item[virtual_account]}</label>
                            </div>

                        </div>
                        <h4 class="inline-form">资金信息</h4>
                        <div style="border-top:1px solid #eee;border-bottom:1px solid #eee;padding: 10px 0px;margin: 0px 0px 10px;">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">可用资金(￥)</label>
                                <label class="col-sm-2 control-label my-left">{run echo $item[usable]?$item[usable]:'0.00'}</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">累计消费(￥)</label>
                                <label class="col-sm-2 control-label my-left">{$item[total_cost]}</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">最后交易时间</label>
                                <label class="col-sm-2 control-label my-left">{$item[last_trade_time]?$item[last_trade_time]:'---'}</label>
                            </div>
                        </div>
                        {/if}

                        <!--tmpl-assocfields-->
                        <div class="btn-group btn-group-or  col-sm-offset-2 inline-top">
                            <a href="{if $id==''}{$do_add_url}{else}{$do_edit_url}?id={$id}{/if}"
                               class="btnlg mb ajaxproxy"
                               proxy='{"method":"post", "location":"{$index_url}"}'>提交保存</a>

                        </div>
                    </form><!-- content add form -->
                </div>
            </div><!-- end of inner -->
        </section>
    </div>
</div>
{include admin.inc.footer}

<!--tmpl-script-->

<!-- pagescript -->
<script type="text/javascript">
    seajs.use("admin/memberadd", function (parameter) {

        /**--tmpl-templatejavascript--**/

        <!--tmpl-templatejavascript-->
        parameter.upload_url = "{$upload_url}";
        parameter.image_search_url = "{$image_search_url}";
        parameter.image_list_url = "{$image_list_url}";
        parameter.init();
    });
</script>


<script id="assocpage" type="text/html">
    <div class="text-right">
        <ul class="pagination blog-pagination">
            <li><a class="assoc-page" data-page="{[prev]}" href="javascript:void(0);">上一页</a></li>
            {[loop pages page]}

            <li><a class="assoc-page" data-page="{[page]}" {[if curr== page]}class="active" {[/if]}
                href="javascript:void(0)">{[page]}</a></li>

            {[/loop]}
            <li><a class="assoc-page" href="javascript:void(0);" data-page="{[nexts]}">下一页</a></li>
        </ul>
    </div>
</script>

</body>
</html>
